package com.crazy.jiakoulachang.mapper;

import com.crazy.jiakoulachang.pojo.Product;
import com.crazy.jiakoulachang.vo.DetailsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 卢辉宇
 * @date: 2023/3/15 21:35
 * @description:
 */
@Mapper
public interface ProductMapper {
    void insert(Product product);

    List<DetailsVO> selectAll();

    void deleteByProductId(Integer productId);

    void updateByProductId(@Param("product") Product product, @Param("productId")Integer productId);


    Double selectNetReceiptsByProductId(Integer productId);

    List<DetailsVO> selectByNetReceipts();

    List<DetailsVO> selectByCreateTime(@Param("startTime") String startTime,@Param("endTime") String endTime);

    Double selectGeneralIncomeByCreateTime(@Param("startTime") String startTime,@Param("endTime") String endTime);
}
